import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';

export class GeetestValidateReqDto {
  @ApiProperty({ description: '极验二次验证表单传参字段challenge' })
  @IsNotEmpty({ message: '极验二次验证表单传参字段challenge不能为空' })
  @IsString({ message: '极验二次验证表单传参字段challenge格式不正确' })
  readonly geetest_challenge: string;

  @ApiProperty({ description: '极验二次验证表单传参字段validate' })
  @IsNotEmpty({ message: '极验二次验证表单传参字段validate不能为空' })
  @IsString({ message: '极验二次验证表单传参字段validate格式不正确' })
  readonly geetest_validate: string;

  @ApiProperty({ description: '极验二次验证表单传参字段seccode' })
  @IsNotEmpty({ message: '极验二次验证表单传参字段seccode不能为空' })
  @IsString({ message: '极验二次验证表单传参字段seccode格式不正确' })
  readonly geetest_seccode: string;
}
